<template>
  <div>
    <Student />
  </div>
</template>

<script setup lang="js" name="homepage">

import { useRouter } from 'vue-router';
import { onMounted } from 'vue';

import Student from './Student.vue';
const router = useRouter()    //只能放到setup函数内

onMounted(() => {
  setTimeout(() =>{
    router.push('/about')   
    //to支持的写法 push都支持 字符串or对象
    // router.push({ path: '/about'})

    // 换成replace就不会有回退
    }, 3000)
  })


</script>

<style lang="css" >

</style>